preOpenBackground
Type
message
Summary
Sent to the current card when you go from a card that does not have a group to a card that does.
Syntax
preOpenBackground <pBackgroundID>
Description
Handle the preOpenBackground message to update a background's appearance before the background appears on screen.
The actual navigation is not triggered by the preOpenBackground message, so trapping the message and not allowing it to pass does not prevent the card with the group from opening. For each group on the card that was not on the previously visited card, a preOpenBackground message (with the group ID) is sent to the current card. If the card does not handle the message, or passes it, the message proceeds through each group in reverse layer order (from highest to lowest). Each group which handles the message should be careful to check that the ID matches itself to prevent inadvertantly trappng a message intended for a different group.
Parameters
Name | Type | Description |
---|---|---|
pBackgroundID | The short ID property of the background being opened. |
Examples
on preOpenBackground theGroup -- move the group's position
if the short name of background ID theGroup is "Navigation"
then set the bottom of group "Navigation" to the height of this card
end preOpenBackground
Related
command: group
control structure: pass
glossary: trap, current card, message, background
keyword: card
message: openControl, openBackground, closeBackground, preOpenCard
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile